package com.sg.plugin.bff.config;

import com.wicket.okrbff.common.util.SnowflakeIdWorker;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author yangkaix@enn.cn
 * 雪花算法配置
 * @since 2021/9/16 14:07
 */
@Configuration
public class SnowFlakeConfig {

    private Long workerId;

    private Long datacenterId;

    @Bean
    public SnowflakeIdWorker snowflakeIdWorker() {
        return new SnowflakeIdWorker(1, 1);
    }
}
